/*! \file synapse.i
    \brief Synapse wrapper for SWIG (C#)

	'Synapse' Data Sharing System | Flinders University | Martin Luerssen | 2009+
*/

%module Synapse

%include "arrays_csharp.i"

%{
#include "../Synapse/synapse.h"
#include "../Synapse/synchrony.h"
%}

%include "../Synapse/synapse.h"
%include "../Synapse/synchrony.h"

%rename(Assign) operator=;
%rename(At) operator[];
%ignore *::WaitForMatch;
%ignore *::Get;
%ignore *::ReadNow;
%ignore *::Read;
%ignore *::ReadWhenNew;
%ignore *::Buffer;
%ignore *::ReadAllAtTime;
%ignore *::ReadAllAtSlot;
%ignore *::ListSlotTimes;
%ignore *::ListSlotCounts;

%apply bool INPUT[] {bool a_pArrayIn[]}
%apply bool OUTPUT[] {bool a_pArrayOut[]}
%apply signed char INPUT[] {signed char a_pArrayIn[]}
%apply signed char OUTPUT[] {signed char a_pArrayOut[]}
%apply unsigned char INPUT[] {unsigned char a_pArrayIn[]}
%apply unsigned char OUTPUT[] {unsigned char a_pArrayOut[]}
%apply short INPUT[] {short a_pArrayIn[]}
%apply short OUTPUT[] {short a_pArrayOut[]}
%apply unsigned short INPUT[] {unsigned short a_pArrayIn[]}
%apply unsigned short OUTPUT[] {unsigned short a_pArrayOut[]}
%apply long INPUT[] {long a_pArrayIn[]}
%apply long OUTPUT[] {long a_pArrayOut[]}
%apply unsigned int INPUT[] {unsigned int a_pArrayIn[]}
%apply unsigned int OUTPUT[] {unsigned int a_pArrayOut[]}
%apply long long INPUT[] {long long a_pArrayIn[]}
%apply long long OUTPUT[] {long long a_pArrayOut[]}
%apply unsigned long long INPUT[] {unsigned long long a_pArrayIn[]}
%apply unsigned long long OUTPUT[] {unsigned long long a_pArrayOut[]}
%apply float INPUT[] {float a_pArrayIn[]}
%apply float OUTPUT[] {float a_pArrayOut[]}
%apply double INPUT[] {double a_pArrayIn[]}
%apply double OUTPUT[] {double a_pArrayOut[]}

%template(BoolSynapse) Synapse<bool>;
%template(CharSynapse) Synapse<signed char>;
%template(UCharSynapse) Synapse<unsigned char>;
%template(ShortSynapse) Synapse<short>;
%template(UShortSynapse) Synapse<unsigned short>;
%template(Int32Synapse) Synapse<long>;
%template(UInt32Synapse) Synapse<unsigned long>;
%template(Int64Synapse) Synapse<long long>;
%template(UInt64Synapse) Synapse<unsigned long long>;
%template(FloatSynapse) Synapse<float>;
%template(DoubleSynapse) Synapse<double>;
%template(ByteSynchroSample) SynchroSample<unsigned char>;
%template(ByteSynchrony) Synchrony<unsigned char>;
